package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary", "sass_library")
load("//tools:defaults.bzl", "markdown_to_html", "ng_module")

ng_module(
    name = "form-field",
    srcs = glob(
        ["**/*.ts"],
        exclude = ["**/*.spec.ts"],
    ),
    assets = [
        ":form-field.css",
        ":form-field-fill.css",
        ":form-field-input.css",
        ":form-field-legacy.css",
        ":form-field-outline.css",
        ":form-field-standard.css",
    ] + glob(["**/*.html"]),
    module_name = "@angular/material/form-field",
    deps = [
        "//src/cdk/bidi",
        "//src/cdk/coercion",
        "//src/cdk/observers",
        "//src/cdk/platform",
        "//src/material/core",
        "@npm//@angular/animations",
        "@npm//@angular/common",
        "@npm//@angular/core",
        "@npm//@angular/forms",
        "@npm//@angular/platform-browser",
        "@npm//rxjs",
    ],
)

sass_library(
    name = "form_field_scss_lib",
    srcs = glob(["**/_*.scss"]),
    deps = ["//src/material/core:core_scss_lib"],
)

sass_binary(
    name = "form_field_scss",
    src = "form-field.scss",
    deps = [
        "//src/cdk/a11y:a11y_scss_lib",
        "//src/material/core:core_scss_lib",
    ],
)

sass_binary(
    name = "form_field_fill_scss",
    src = "form-field-fill.scss",
    deps = [
        "//src/cdk/a11y:a11y_scss_lib",
        "//src/material/core:core_scss_lib",
    ],
)

sass_binary(
    name = "form_field_input_scss",
    src = "form-field-input.scss",
    deps = ["//src/material/core:core_scss_lib"],
)

sass_binary(
    name = "form_field_legacy_scss",
    src = "form-field-legacy.scss",
    deps = [
        "//src/cdk/a11y:a11y_scss_lib",
        "//src/material/core:core_scss_lib",
    ],
)

sass_binary(
    name = "form_field_outline_scss",
    src = "form-field-outline.scss",
    deps = ["//src/material/core:core_scss_lib"],
)

sass_binary(
    name = "form_field_standard_scss",
    src = "form-field-standard.scss",
    deps = [
        "//src/cdk/a11y:a11y_scss_lib",
        "//src/material/core:core_scss_lib",
    ],
)

markdown_to_html(
    name = "overview",
    srcs = [":form-field.md"],
)

filegroup(
    name = "source-files",
    srcs = glob(["**/*.ts"]),
)
